package com.cc.gulimall.order;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 1.引入amqp场景启动器，
 * 2.配置属性
 * 开启注解 @EnableRabbit
 * 监听消息：在前面开启注解的情况下，开启 @RabbitListener
 *
 * @RabbitListener类加方法都可以，@RabbitHandle只可以标在方法上(重载区分不同消息) 配合使用：@RabbitListener标在类上声明监听哪些队列，@RabbitHandle只可以标在方法上(方法参数重载区分不同消息)
 */
@EnableAspectJAutoProxy(exposeProxy = true)/*替换jdk默认的动态代理，即使没有接口也可以代理*/
@EnableFeignClients
@EnableRedisHttpSession
@EnableRabbit /*需要监听消息时采用这个注解，只发送不用*/
@EnableDiscoveryClient
@SpringBootApplication
public class GulimallOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallOrderApplication.class, args);
    }

}
